namespace CloudNinja.Metering.Common.Configuration
{
    using System.Configuration;

    public class CommonSettingsElement : ConfigurationElement
    {
        [ConfigurationProperty("BlockConnectionString", IsRequired = true, DefaultValue = "UseDevelopmentStorage=true")]
        public string BlockConnectionString
        {
            get
            {
                return (string)this["BlockConnectionString"];
            }

            set
            {
                this["BlockConnectionString"] = value;
            }
        }

        [ConfigurationProperty("ConnectionStrings", IsDefaultCollection = false), ConfigurationCollection(typeof(ConnectionStringElement), AddItemName = "addConnectionString", ClearItemsName = "clearConnectionStrings", RemoveItemName = "removeConnectionString")]
        public ConnectionStringsCollection ConnectionStrings
        {
            get
            {
                return this["ConnectionStrings"] as ConnectionStringsCollection;
            }

            set
            {
                this["ConnectionStrings"] = value;
            }
        }
    }
}